package com.marquis.cloud.client;

import com.marquis.cloud.entity.Person;
import com.marquis.cloud.fallBack.PersonClientFallBack;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Feign客户端
 * cloud-providerr: 待请求的服务ID
 */
@FeignClient(name = "cloud-provider", fallback = PersonClientFallBack.class)
public interface PersonClient {

    @RequestMapping(value = "/person/findById/{id}",method = RequestMethod.GET)
    Person findById(@PathVariable("id") int id);
}
